<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
	<title>密码修改</title>
	<link rel="stylesheet" type="text/css" href="/static/css/reset.css">
	<link rel="stylesheet" type="text/css" href="/static/css/animate.css">
	<link rel="stylesheet" type="text/css" href="/static/css/style.css">

<body>
    <div class="wp">
        <div class="resetpassword" id="resetPwdForm">
            <h1>修改密码</h1>
            <p>已经通过验证，请设置新密码</p>
            <form id="reset_password_form" method="post" action="{% url 'modify_pwd' %}">
                {% csrf_token %}
                <ul>
                    <li class="{% if modify_pwd.errors.password1 %}errorput{% endif %}">
                        <span class="">新 密 码 ：</span>
                        <input type="password" name="password1" id="pwd" placeholder="6-20位非中文字符">
                        <i></i>
                    </li>
                    <input type="hidden" name="email" value="{{ email }}"/>

                   <li class="{% if modify_pwd.errors.password2 %}errorput{% endif %}">
                        <span class="">确定密码：</span>
                        <input type="password" name="password2" id="repwd" placeholder="6-20位非中文字符">
                        <i></i>
                    </li>
                    <div class="error btns" id="jsPasswdResetTips"></div>
                        {% for key,error in modify_pwd.errors.items %}
                        {{ error }}
                        {% endfor %}
                        {{ msg }}

                    <li class="button">
                        <input type="submit" value="提交">
                        <!--<input type="submit" id="TIJIAOMIMA" value="提交">-->
                    </li>
                </ul>
                {% csrf_token %}
            </form>
        </div>
        <div class="resetpassword" id="reset_password_tips" style="display:none;">
            <h1>修改密码成功,请重新登录</h1>
            <img class="fl" src="/static/images/check2.png">
            <p class="successword">已经成功修改密码，请重新登录</p>
        </div>
    </div>
    <!--<script>-->
        <!--$(function () {-->
<!--//            $("#reset_password_form").keydown(function(event) {-->
<!--//                if(event.keyCode == 13) {-->
<!--//                    $('#TIJIAOMIMA').trigger('click');-->
<!--//                }-->
<!--//        });-->
<!--//            $("#TIJIAOMIMA").on('click', function () {-->
            <!--$("#TIJIAOMIMA").click(function () {-->
                <!--$.ajax({-->
                    <!--url:"/modify_pwd",-->
                    <!--type:"POST",-->
                    <!--data:$('#reset_password_form').serialize(),-->
                    <!--success:function (data) {-->
                        <!--alert(data);-->
                    <!--}-->
<!--//                    data:{'password1':$('#pwd').val(), 'password2':$('#repwd').val()},-->
<!--//                    success:function () {-->
<!--//                        alert(data);-->
<!--//                    }-->
                <!--})-->
            <!--})-->
        <!--})-->
    <!--</script>-->
</body>
</html>